<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Tools - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.ldap.tools.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.ldap.tools.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.ldap.usage.html">Usage Scenarios</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.ldap.html">Zend_Ldap</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.ldap.node.html">Object oriented access to the LDAP tree using Zend_Ldap_Node</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.ldap.tools" class="section"><div class="info"><h1 class="title">Tools</h1></div>
    

    <div class="section" id="zend.ldap.tools.dn"><div class="info"><h1 class="title">Creation and modification of DN strings</h1></div>
        
        <p class="para"/>
    </div>

    <div class="section" id="zend.ldap.tools.filter"><div class="info"><h1 class="title">Using the filter API to create search filters</h1></div>
        

        <div class="example" id="example-510"><div class="info"><p><b>Example #1 Create simple LDAP filters</b></p></div>
            

            <pre class="programlisting brush: php">
$f1  = Zend_Ldap_Filter::equals(&#039;name&#039;, &#039;value&#039;);         // (name=value)
$f2  = Zend_Ldap_Filter::begins(&#039;name&#039;, &#039;value&#039;);         // (name=value*)
$f3  = Zend_Ldap_Filter::ends(&#039;name&#039;, &#039;value&#039;);           // (name=*value)
$f4  = Zend_Ldap_Filter::contains(&#039;name&#039;, &#039;value&#039;);       // (name=*value*)
$f5  = Zend_Ldap_Filter::greater(&#039;name&#039;, &#039;value&#039;);        // (name&gt;value)
$f6  = Zend_Ldap_Filter::greaterOrEqual(&#039;name&#039;, &#039;value&#039;); // (name&gt;=value)
$f7  = Zend_Ldap_Filter::less(&#039;name&#039;, &#039;value&#039;);           // (name&lt;value)
$f8  = Zend_Ldap_Filter::lessOrEqual(&#039;name&#039;, &#039;value&#039;);    // (name&lt;=value)
$f9  = Zend_Ldap_Filter::approx(&#039;name&#039;, &#039;value&#039;);         // (name~=value)
$f10 = Zend_Ldap_Filter::any(&#039;name&#039;);                     // (name=*)
</pre>

        </div>

        <div class="example" id="example-511"><div class="info"><p><b>Example #2 Create more complex LDAP filters</b></p></div>
            

            <pre class="programlisting brush: php">
$f1 = Zend_Ldap_Filter::ends(&#039;name&#039;, &#039;value&#039;)-&gt;negate(); // (!(name=*value))

$f2 = Zend_Ldap_Filter::equals(&#039;name&#039;, &#039;value&#039;);
$f3 = Zend_Ldap_Filter::begins(&#039;name&#039;, &#039;value&#039;);
$f4 = Zend_Ldap_Filter::ends(&#039;name&#039;, &#039;value&#039;);

// (&amp;(name=value)(name=value*)(name=*value))
$f5 = Zend_Ldap_Filter::andFilter($f2, $f3, $f4);

// (|(name=value)(name=value*)(name=*value))
$f6 = Zend_Ldap_Filter::orFilter($f2, $f3, $f4);
</pre>

        </div>
    </div>

    <div class="section" id="zend.ldap.tools.attribute"><div class="info"><h1 class="title">Modify LDAP entries using the Attribute API</h1></div>
        
        <p class="para"/>
    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.ldap.usage.html">Usage Scenarios</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.ldap.html">Zend_Ldap</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.ldap.node.html">Object oriented access to the LDAP tree using Zend_Ldap_Node</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="reference.html">Zend Framework Reference</a></li>
  <li class="header up"><a href="zend.ldap.html">Zend_Ldap</a></li>
  <li><a href="zend.ldap.introduction.html">Introduction</a></li>
  <li><a href="zend.ldap.api.html">API overview</a></li>
  <li><a href="zend.ldap.usage.html">Usage Scenarios</a></li>
  <li class="active"><a href="zend.ldap.tools.html">Tools</a></li>
  <li><a href="zend.ldap.node.html">Object oriented access to the LDAP tree using Zend_Ldap_Node</a></li>
  <li><a href="zend.ldap.server.html">Getting information from the LDAP server</a></li>
  <li><a href="zend.ldap.ldif.html">Serializing LDAP data to and from LDIF</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>